UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'W0Lxwe48/vCd8KOsHqrYVQNFKfDE57BZdfDRIv3KCBc=' 
WHERE 
  key_id = '74f2234b97d5c5a2f0e29371c7a8a6c3fe730d8c02de1ed00adcc3c4f82fab10' 
  AND (
    token = 'W0Lxwe48/vCd8KOsHqrYVQNFKfDE57BZdfDRIv3KCBc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022