UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '94Ox1+sK/d5Yfe2jYqshZe5RMY0/CFSpEYLrYluSLNQ='
WHERE
key_id = '6d94aab0923a454cec072471e45c4ecd064f34441b138c23969aebf852641da2'
AND (
token = '94Ox1+sK/d5Yfe2jYqshZe5RMY0/CFSpEYLrYluSLNQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)