UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2FfhzVnyMYdcA910BLJSkn0b/erdv53OveCDpopPHoI='
WHERE
key_id = '5383edc599cff2103b7a9c95d977bb8a03966b6cda0b7cfcfb6d7e1e0b054342'
AND (
token = '2FfhzVnyMYdcA910BLJSkn0b/erdv53OveCDpopPHoI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)