UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'W+Bq+P2btzhzJoLMqlBaLdooH4pB24HUwD30AnVYvnE='
WHERE
key_id = '91002aec4a1aba3277c89fdd534bb0de16f80f7b80070c2b8efe585d66b02686'
AND (
token = 'W+Bq+P2btzhzJoLMqlBaLdooH4pB24HUwD30AnVYvnE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)