UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YuApv8aVzLo6+mEMrYcsi4A/qnzgXxOfr6bqjJC/OAo='
WHERE
key_id = 'b41e23707b673444fdab57780d96ecb3ab541410b4d0361837920b05031860e5'
AND (
token = 'YuApv8aVzLo6+mEMrYcsi4A/qnzgXxOfr6bqjJC/OAo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)