UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'LIYrXbGrh/r8dzpgeP0NkmImC0rCc7qR6Xetl8lkPV0=' 
WHERE 
  key_id = '2041d4178681edcff9cd3a7b1458b3e97ccf7f6f2f146be42974f7cd8231977f' 
  AND (
    token = 'LIYrXbGrh/r8dzpgeP0NkmImC0rCc7qR6Xetl8lkPV0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037