UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'lhe/om4x7INhJw4Yq3p6deeUtf/SdZWMWtI4LyKjPFE=' 
WHERE 
  key_id = '06f9efacc68a508fb72dabda9cfdcc778713b45df44bbdc846093b5a480c5dcc' 
  AND (
    token = 'lhe/om4x7INhJw4Yq3p6deeUtf/SdZWMWtI4LyKjPFE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033