UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'rlx5Tri0XJcUtJOfOhRAmD4EHdL3iygdDfSbnPaf8ig=' 
WHERE 
  key_id = '9207f54f7d4d0fadbfc1e9966905e2a1a56f2ab33c1fbcaef90dd4ab20c6daff' 
  AND (
    token = 'rlx5Tri0XJcUtJOfOhRAmD4EHdL3iygdDfSbnPaf8ig=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034