UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/n7BP6KFHjvbL1HSg3in3WDjTxm++2BkLxrl6lIm51c='
WHERE
key_id = 'fcebaf8f197c7ba04b5a704de665379edc778d280a7fee7ecbb91fe2aad60c0a'
AND (
token = '/n7BP6KFHjvbL1HSg3in3WDjTxm++2BkLxrl6lIm51c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)