UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fPsTRLUPejUjEDR6K7CyXrivQ5qwyCP/oDHUQfLb3vE='
WHERE
key_id = '806fbd35c533981455bf7779b1dbf19e75bab66638217e275ae09e767d7320bf'
AND (
token = 'fPsTRLUPejUjEDR6K7CyXrivQ5qwyCP/oDHUQfLb3vE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)