UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hSeILHeRI5/a5/GDkRYbCHrVo8PsSLM+282auN2ThAU='
WHERE
key_id = '044119864bd854a6a65e5189dcb1584df191399b81d04128e8bd60af34ace318'
AND (
token = 'hSeILHeRI5/a5/GDkRYbCHrVo8PsSLM+282auN2ThAU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)