UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PBCTedQ2B6R97ODzFN8WkkedXP4TQVCwuQUGFK7Tr6o='
WHERE
key_id = '3cfb945d57b3d16feb31c9b9437492d9cc149ae0bcf9c78a9345ae7e00d97d79'
AND (
token = 'PBCTedQ2B6R97ODzFN8WkkedXP4TQVCwuQUGFK7Tr6o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)