UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'rZlYNCW3FFn9sWSOh2oLzm2MRxpIiL8wungsRYSWPro=' 
WHERE 
  key_id = 'ed60b4c32ca84d903d461c7bf99a57141c57ad3a7a171ef4f5f3ab28b135dfaa' 
  AND (
    token = 'rZlYNCW3FFn9sWSOh2oLzm2MRxpIiL8wungsRYSWPro=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033