UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Dn7EzETz9E0Ot3q5uhSV0qOblv9iMC+iCgBfqx8VX6k=' 
WHERE 
  key_id = '72b15cd6f5489e59766d1c65692c1064337264468b72caca00564a7d430c1955' 
  AND (
    token = 'Dn7EzETz9E0Ot3q5uhSV0qOblv9iMC+iCgBfqx8VX6k=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00014