UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FtZJisRbiewiW2bkJIPZ5ZsC5z408miQeYuxbmqWDsA='
WHERE
key_id = '0c08e43f0eb58afa4e8d4ce4e8cb6ddc7002e1578dd63b2cf57e2014e247ae58'
AND (
token = 'FtZJisRbiewiW2bkJIPZ5ZsC5z408miQeYuxbmqWDsA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)