UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rzOF07hD9imfNZLQUcYS7myEENQ6ftUg9xI9r2ImCDU='
WHERE
key_id = '88e1d227311203a00f520f9ad6ea524f8533d89f8a1f8ee0e6f966df63480264'
AND (
token = 'rzOF07hD9imfNZLQUcYS7myEENQ6ftUg9xI9r2ImCDU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)