UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+/h8JCmLKMvBn/qSqhxRfFLSLzcCuP5bo6J8uQSU3q0=' 
WHERE 
  key_id = 'eedb963f74f0905936de67904f584c8e627f44c4debd8fe6ee819d82b373cfc9' 
  AND (
    token = '+/h8JCmLKMvBn/qSqhxRfFLSLzcCuP5bo6J8uQSU3q0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033