UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+fj8kQ83BrhMElEFpgTOjjUdpPYWAiAaxdhJEsOs+e0=' 
WHERE 
  key_id = '792ee4594b24d132cba964d2084c4da92ee7bedfffa3fb298c0fdcadb8a9e95d' 
  AND (
    token = '+fj8kQ83BrhMElEFpgTOjjUdpPYWAiAaxdhJEsOs+e0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043