UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 't3us5UnjTypJDKAPfCgVjXo8pBtVeV7j+Mk1NO9BcRs='
WHERE
key_id = '8262e76ab75582b41698db98ccc1b6046129645662d207be54d1fb72b0892d45'
AND (
token = 't3us5UnjTypJDKAPfCgVjXo8pBtVeV7j+Mk1NO9BcRs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)