UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7nSlzAafpvSNmvl4nmv1hAjUtYaJbmJ/JSKa4UEs7ZY='
WHERE
key_id = '960ce52aef0d41c9a8e21212721107d7a9f7400c46a318d82e3c679bae8f3fe6'
AND (
token = '7nSlzAafpvSNmvl4nmv1hAjUtYaJbmJ/JSKa4UEs7ZY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)