UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lQS3K3IfvRGK8/yaKZSO5R5fVLg/ofhfpkvGp6KNNo4='
WHERE
key_id = '23b33eba5ad140348d513d46bfb5d8857d1402e4cd0de74b010b3e6e077090e2'
AND (
token = 'lQS3K3IfvRGK8/yaKZSO5R5fVLg/ofhfpkvGp6KNNo4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)