UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3U/BSp6dPdo/aFlg3iletpiQNImC7zHKt2pqmFJB15A=' 
WHERE 
  key_id = 'cfbb7571c09a64a764a88a15698fc1a78e77ee9c5f668bfd77d1c4afb83b52a1' 
  AND (
    token = '3U/BSp6dPdo/aFlg3iletpiQNImC7zHKt2pqmFJB15A=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035