UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'H2VDbOG/LMp+AxdhRE3zb7qIx0/XeDbEWUbTJq25Mhk='
WHERE
key_id = 'fa2e1d91c106c0157cd9bea67bec669e8dc2175583a1dedb6d6f1cb6e2cf27b7'
AND (
token = 'H2VDbOG/LMp+AxdhRE3zb7qIx0/XeDbEWUbTJq25Mhk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)