UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OIzfwllc6nXka36MODU8B+07L+IZLboH20/V49I/9Rs='
WHERE
key_id = '4b6e2922b901f7277b7952d4c32a41fa1abd95a910916c5b3bb71dd6da90fe5b'
AND (
token = 'OIzfwllc6nXka36MODU8B+07L+IZLboH20/V49I/9Rs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)