UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'j1SBFPPmv8TpupP0jZ2aeP7BD1CknfTNnrNbEPhlnPg='
WHERE
key_id = '720007e05886979fb89cd662ce5faa47ff2c37fff455c9380617c62b6f3b69e3'
AND (
token = 'j1SBFPPmv8TpupP0jZ2aeP7BD1CknfTNnrNbEPhlnPg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)