UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '6JoyDzYAV2ua5LfWHDcP9f0mT7wREu67uJ4FC9lsmmk=' 
WHERE 
  key_id = 'a33a1c34a60b820c3873e67dbad9e8b91faab3ff560b7612f0ff475ccf128883' 
  AND (
    token = '6JoyDzYAV2ua5LfWHDcP9f0mT7wREu67uJ4FC9lsmmk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033