UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'u3KnUxDeSmws/gb8Qk1rcdhpK/+M0o3q7JMeRFQseSk='
WHERE
key_id = '9404de2a154b5c693ca2f127de13b358a068a5d2cee578007f56c0e9dea0dfc9'
AND (
token = 'u3KnUxDeSmws/gb8Qk1rcdhpK/+M0o3q7JMeRFQseSk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)