UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+gui/uart4PdUWRFmSPk97peSQmeP+JIHAK27mmL26c='
WHERE
key_id = '29b5a0e9090bb1de29852e248683d08420f16ef0c5f4bba8fdb60922d0f7804e'
AND (
token = '+gui/uart4PdUWRFmSPk97peSQmeP+JIHAK27mmL26c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)