UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Gm6MR53/qNkdFvpZoAawEfTLpJpMZDXHAqJa5B6X6TA=' 
WHERE 
  key_id = 'fe55540b52ca0d914b635a3d74bc0d176bfd939f75f8f1e515532d2d9f45e053' 
  AND (
    token = 'Gm6MR53/qNkdFvpZoAawEfTLpJpMZDXHAqJa5B6X6TA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032