UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MAClKZV1Zc4Phc0mL2GjnbiX6zg/+vswX2C7pNeN4KM='
WHERE
key_id = '81bf83b9eb24bfafe090ebc0cfd6c7699bbe2cb7d5cfebbae7de1eb4b3d9cc4e'
AND (
token = 'MAClKZV1Zc4Phc0mL2GjnbiX6zg/+vswX2C7pNeN4KM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)