UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ozIlBQTqQeSFLcfZe/0hA1wnJ2PmMPNedNBs9/YASgI='
WHERE
key_id = '62f5b0d74b6aa447ce3eb69d344facf59dd77fa17c31036eb3dc6c7c29175eba'
AND (
token = 'ozIlBQTqQeSFLcfZe/0hA1wnJ2PmMPNedNBs9/YASgI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)