UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'bfZvj74GQ+XhsWSjOCr+Kh8jBseHp8c40h/v4ZkffKY=' 
WHERE 
  key_id = '04410fb72118d9fc3df42586c74d363816ebc15f5e306685290559486bbc8c9d' 
  AND (
    token = 'bfZvj74GQ+XhsWSjOCr+Kh8jBseHp8c40h/v4ZkffKY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028