UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SmhyLLRUzGbV0qk0+R535FTpYLVhxhk4rNjf5vK+888='
WHERE
key_id = '654611ccbade9993d410b95709983ef1ce1d4f1c705bf075f4fac5ad3bff7125'
AND (
token = 'SmhyLLRUzGbV0qk0+R535FTpYLVhxhk4rNjf5vK+888='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)