UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Mwjn719uZGkPg/6zQtZ/LptFf59xdE5ap6OPmbKaN/E=' 
WHERE 
  key_id = '90e31e984b4f5ea319c5d09a98ba3563c8b7bdc0859307173a09f700a954bae8' 
  AND (
    token = 'Mwjn719uZGkPg/6zQtZ/LptFf59xdE5ap6OPmbKaN/E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00046