UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'MAGyxNhMrjv22IcfTOHKKx4ooYm/9Iy8BK38aEQ/eVM=' 
WHERE 
  key_id = 'c55d0660fe0528279321251e0f4f3fd4cb05cfce1c53fddbe8fcec5578ed021c' 
  AND (
    token = 'MAGyxNhMrjv22IcfTOHKKx4ooYm/9Iy8BK38aEQ/eVM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00046