UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6wp/ULZeoCa1NQBDcm9p5UXq49Ij1x5Gv7+JAXMweVg='
WHERE
key_id = '661c8ee5b83da31834998713cefe05c26fcb0fa68b5aadf9fdb4cdb1fb0b6253'
AND (
token = '6wp/ULZeoCa1NQBDcm9p5UXq49Ij1x5Gv7+JAXMweVg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)