UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pGae+3LaYT/HYUCPVPXPXf2Xz7wtXXwnT6tOgitsQfY='
WHERE
key_id = '369325f8cd980f48df523a1a26bb39446fda875d0693f5e67fb4b2bd1305f1e1'
AND (
token = 'pGae+3LaYT/HYUCPVPXPXf2Xz7wtXXwnT6tOgitsQfY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)