UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YFFJjeCR5RvRrjNEM3q/dnPYZeWBAKnRAl+Z7rxwOSY='
WHERE
key_id = '9eb70053f792d9e36ddb86327d8a5ec229184a7b15a75fcc37c0ccc81e45ea6c'
AND (
token = 'YFFJjeCR5RvRrjNEM3q/dnPYZeWBAKnRAl+Z7rxwOSY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)