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