UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SQnZOdaVDXJhPnIhelNeZgzpeJgzgO1uHyJD3cPmp7M='
WHERE
key_id = '2355552f1d9e91a08525751390232adde150a03630bb87188b2e39e8e6d2dc6c'
AND (
token = 'SQnZOdaVDXJhPnIhelNeZgzpeJgzgO1uHyJD3cPmp7M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)