UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WZXslW0g7gwx39mgfdOazuehJgm8pUaUUAOYQ8sIANI='
WHERE
key_id = '5cf7a3f7c04744cab7cc3f5549aa68a4f056554a024c503fbd7bbb870ff7aab1'
AND (
token = 'WZXslW0g7gwx39mgfdOazuehJgm8pUaUUAOYQ8sIANI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)