UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'M6GidDBnaOLQe4zMRiGcT/wyPd4uONBUi3RUTPX8PlM='
WHERE
key_id = '93d0856c6404199408e55d6d6697f6db916af88f7940412f140a3ded47edb24e'
AND (
token = 'M6GidDBnaOLQe4zMRiGcT/wyPd4uONBUi3RUTPX8PlM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)